home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
002
/
ws100.bas
< prev
next >
Wrap
BASIC Source File
|
1988-11-09
|
3KB
|
69 lines
60 MAXFILES=2:P$="COM:38N1D"
100 CLS:PRINT@45,"WORDSTAR TRANSMISSION PROGRAM"
110 PRINT:PRINT " Default protocol uses the RS-232"
120 PRINT " modem at 300 baud with 8 bit, No parity";
130 PRINT " 1 Stop bit & Xon disabled."
170 PRINT:PRINT "Would you like to change the defaults? ";
180 GOSUB 990:A%=(INSTR("YyNn",I$)+1)/2
190 IF A%<>0 THEN ON A% GOTO 380,230 ELSE 170
230 CLS:INPUT"Name of file to send ";FI$
235 IF RIGHT$(FI$,3)=".do" THEN GOTO 260
240 A%=INSTR(FI$,".do"):IF A%<>0 THEN 260
250 FI$ = FI$+".do"
260 OPEN FI$ FOR INPUT AS 1
270 OPEN P$ FOR OUTPUT AS 2
275 CLS:PRINT@45, "Ready to send..."
276 PRINT:PRINT " Open a BINARY file for input on the PC":PRINT:PRINT "
press any key when ready"
277 GOSUB 990:GOTO 278
278 CLS:PRINT@175, "working..."
280 C$= INPUT$(1,1)
290 PRINT #2, C$;
300 IF EOF(1) THEN PRINT #2, CHR$(26) ELSE GOTO 280
310 CLS:PRINT:PRINT:PRINT " DONE!":CALL 21179
320 PRINT " PRESS ANY KEY TO CONTINUE":GOSUB 990: GOTO 60
380 CLS
390 PRINT"Baud rate selection":PRINT
400 PRINT"0 - Modem (300)* 5 - 1200 baud"
410 PRINT"1 - 75 baud 6 - 2400 baud"
420 PRINT"2 - 110 baud 7 - 4800 baud"
430 PRINT"3 - 300 baud 8 - 9600 baud"
440 PRINT"4 - 600 baud 9 - 19200 baud"
450 PRINT "Choice ? ";:GOSUB 990
460 P1=ASC(I$)-48:IF P1<0 THEN 380 ELSE IF P1>9 THEN 380
470 P1$=I$
510 CLS:PRINT"Word length selection"
520 PRINT:PRINT"6 - 6 bits"
530 PRINT"7 - 7 bits"
540 PRINT"8 - 8 bits *"
550 PRINT"Choice ? ";:GOSUB 990
560 P2=VAL(I$):IF P2<6 THEN 510 ELSE IF P2>8 THEN 510 ELSE P2$=I$
600 CLS:PRINT"Parity Selection"
610 PRINT:PRINT" I - Ignore parity"
620 PRINT" O - Odd parity"
630 PRINT" E - Even paruty"
640 PRINT" N - No parity *"
650 PRINT"Choice ? ";:GOSUB 990
660 A%=(INSTR("IiOoEeNn",I$)+1)/2
670 IF A%<1 THEN 600 ELSE IF A%>4 THEN 600
680 P3$=MID$("IOEN",A%,1)
720 CLS:PRINT"Stop Bit Selection"
730 PRINT:PRINT" 1 - 1 stop bit *"
740 PRINT" 2 - 2 stop bits"
750 PRINT:PRINT"Choice ?";:GOSUB 990
760 A%=VAL(I$):IF A%<1 THEN 720 ELSE IF A%>2 THEN 720
770 IF A%=1 THEN P4$="1" ELSE P4$="2"
810 CLS:PRINT"Line Status Selection"
820 PRINT:PRINT" E - Enable (XON)"
830 PRINT" D - Disable (XOFF) *"
840 PRINT:PRINT"Choice ?";:GOSUB 990
850 A%=(INSTR("EeDd",I$)+1)/2
860 IF A%<1 THEN 810 ELSE IF A%>2 THEN 810
870 P5$=MID$("ED",A%,1)
880 IF P1$="0" THEN P$="MDM:"+P2$+P3$+P4$+P5$:CALL 21200:GOTO 930
890 P$="COM:"+P1$+P2$+P3$+P4$+P5$
930 PRINT:PRINT"Your selection was "; P$:PRINT"Is this OK? "
940 GOSUB 990:A%=(INSTR("YyNn",I$)+1)/2
950 IF A%=1 THEN 230 ELSE IF A%=2 THEN 380 ELSE 940
990 I$=INKEY$:IF I$="" THEN 990 ELSE RETURN